import { createStore, applyMiddleware } from 'redux';
import { combineReducers } from 'redux-immutable';
import thunk from 'redux-thunk';
import { composeWithDevTools } from 'redux-devtools-extension/logOnlyInProduction';
import { reducer as homeReducer } from '../pages/home/store';
import { reducer as siderReducer } from '../pages/home/components/sider/store';
import { reducer as footerReducer } from '../pages/home/components/footer/store';

export const reducer = combineReducers({
	home: homeReducer,
	sider: siderReducer,
	footer: footerReducer,
});


const composeEnhancers = composeWithDevTools({});

export const store = createStore(reducer, composeEnhancers(
	applyMiddleware(thunk)
));
